home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 August / SAN CD 8-2007 CD-ROM 27.iso / pc / Software / PlanetEngine / install.exe / install.dxr / 00002_installer control.ls < prev    next >
Encoding:
Text File  |  2007-06-15  |  1.3 KB  |  39 lines

  1. on startMovie
  2.   baRegister("Adam Crute", 3344335)
  3.   runInstaller()
  4. end
  5.  
  6. on runInstaller
  7.   srcPath = the moviePath & "planet0705\"
  8.   defName = "PlanetEngine"
  9.   installer = new(script("Installer"), srcPath, defName)
  10.   if voidp(installer) then
  11.     baMsgBox("The installer could not be initiated", "Error", "OK", "stop", 1)
  12.     halt()
  13.   end if
  14.   chooseDestResult = installer.chooseDest()
  15.   if not chooseDestResult then
  16.     if baMsgBox("Exit the installer?", "Exit?", "OKCancel", "question", 1) = "OK" then
  17.       halt()
  18.     else
  19.       runInstaller()
  20.       exit
  21.     end if
  22.   end if
  23.   if not installer.confirmInstall() then
  24.     if baMsgBox("Exit the installer?", "Exit?", "OKCancel", "question", 1) = "OK" then
  25.       halt()
  26.     else
  27.       runInstaller()
  28.       exit
  29.     end if
  30.   end if
  31.   copyResult = installer.copyFiles()
  32.   if not copyResult then
  33.     baMsgBox("An unspecified error occured whilst copying files - the software may not work correctly" & RETURN & "No system files have been edited and you may safely delete the destination folder that" & RETURN & "was specified along with any files it contains. Please re-run this installer to try again", "Error", "OK", "information", 1)
  34.     halt()
  35.   end if
  36.   baMsgBox("The software has been successfully installed into the specified folder", "Complete", "OK", "information", 1)
  37.   halt()
  38. end
  39.